****************************************************************************************************************
**																											  **
** This do file is part of the replication material for the following article: 								  **
**  "Voter mobilization in the echo chamber: Broadbandinternet and the rise of populism in Europe" 	          **
** 		Authors: Max Schaub, Davide Morisi			    													  **
** 		Journal: European Journal of Political Research														  **
**																											  **
** This file replicates the following step of the analysis: 												  **
**																											  **
**		PARTIAL MERGING AND RECODING DATASETS FOR GERMANY																  **
**																											  **
****************************************************************************************************************

*Set working directory
cd "..."


*******************
*COMBINE INDIVIDUAL LEVEL DATA WITH PLZ DATA

* Combine GLES files
use   "...\orig\Input_GLES\GLES_data\ZA5741_v1-0-0_plz.dta", clear //BW
append using "...\orig\Input_GLES\GLES_data\ZA5742_v1-0-0_plz.dta" //SA
append using "...\orig\Input_GLES\GLES_data\ZA5743_v1-0-0_plz.dta" //RP
append using "...\orig\Input_GLES\GLES_data\ZA5744_v1-0-0_plz.dta" //MV
append using "...\orig\Input_GLES\GLES_data\ZA6819_v1-0-0_plz.dta" //SH

save "...\MV_SA_BW_RP_SH_combined.dta", replace

* Merge with PLZ-dataset
tostring(l201), gen(plz)
merge m:1 plz using "...\plz_data_germany.dta" 
drop if _merge==2
drop _merge

* Merge with broadband coverage data
* Note: Access to the coverage data requires an application to the TÜV Rheinland GmbH at breitbandatlas@de.tuv.com.

* Save
save "...\MV_SA_BW_RP_SH_combined_incl_plz.dta", replace




